import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";

// 引入Element Plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

// 引入路由
import router from "./router";

// 引入状态管理
import pinia from "./store";

// 引入样式
import "./styles/index.scss";

const app = createApp(App);

// 注册所有Element Plus图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

app.use(ElementPlus, { size: "default", zIndex: 3000 });
app.use(pinia);
app.use(router);

app.mount("#app");
